home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 1998 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  889 b 

  1. Path: news.tu-chemnitz.de!news
  2. From: hfst@hrz.tu-chemnitz.de (Hans Steffani)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Newbie question: Is this code OK?
  5. Date: 18 Jan 96 07:21:44 GMT
  6. Organization: University of Technology Chemnitz, FRG
  7. Message-ID: <4dksom$kkn@pyrrhus-f.hrz.tu-chemnitz.de>
  8. References: <4di986$fk1@pegasus.interpac.net> <4dj7gp$e1o@beach.and.nl>
  9. NNTP-Posting-Host: mmu.hrz.tu-chemnitz.de
  10.  
  11. jos@and.nl (Jos A. Horsmeier) writes:
  12.  
  13. >Let's turn this pseudo cody thingy into a C function; we represent stateA
  14. >by an int 1 (or any other non-zero value) and stateB by an int 0. 
  15.  
  16. Maybe this could be good example for using enums. What about
  17. enum {stateA, stateB} state = StateB;
  18.  
  19. you also have to change the second if.
  20.  
  21. Hans Friedrich Steffani
  22. --
  23. Hans Friedrich Steffani
  24. Institut fuer Elektrische Maschinen und Antriebe
  25. TU Chemnitz-Zwickau
  26. e-mail: hans.steffani@e-technik.tu-chemnitz.de
  27.